This disclosure relates generally to propagation of constants in data processing systems and more specifically to propagation of may-constants in data processing systems.
In a data processing system environment, programming languages typically provide a mechanism for the propagation of constants as used within computer executable program code. Constants that are assigned to a variable can be propagated through data structures built in memory. Typical data structures include examples such as a call graph and a control flow graph. The propagated constant is substituted at the instance or location of use of the variable.
The existing technique of constant propagation can be used to trigger the removal of dead code. Constant propagation, in addition, can be used to perform partial evaluation of code segments at compile time.